<h1>友情链接管理</h1>

<table>
  <tr>
    <th width="8%">编号</th>
    <th width="25%">站点名称</th>
    <th>站点地址</th>
    <th width="10%">状态</th>
    <th width="12%">管理</th>
  </tr>

  <% @friend_links.each do |friend_link| %>
    <tr>
      <td><%=h friend_link.id %></td>
      <td><%=h friend_link.name %></td>
      <td><%=h friend_link.url %></td>
      <td><%= format_flag(friend_link.flag) %></td>
      <td>
        <%= link_to_remote image_tag('edit.png',:title => '编辑'), :update => 'content', :method => :get, :url => edit_friend_link_path(friend_link) %>
        <%= link_to image_tag('delete.png',:title => '删除'), friend_link, :confirm => 'Are you sure?', :method => :delete %>
      </td>
    </tr>
  <% end %>
</table>

<br />

<%= link_to_remote '新建友情链接', :update => 'content', :method => :get, :url => new_friend_link_path %>